Simplify LLVM IR generated for OpenCL blocks
authorAndrew Savonichev <andrew.savonichev@intel.com>
Thu, 21 Feb 2019 11:02:10 +0000 (11:02 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Tue, 12 Nov 2019 13:12:48 +0000 (13:12 +0000)
commit9637d510952ed260d4a83a5074321f6509ce7a70
treea8e802d3caebb6a414be3dd1370dab1912bf36aa
parentd67fda99bd032e1bd20f4d59ef363a406554e4a6
Simplify LLVM IR generated for OpenCL blocks

Summary:
Emit direct call of block invoke functions when possible, i.e. in case the
block is not passed as a function argument.
Also doing some refactoring of `CodeGenFunction::EmitBlockCallExpr()`

Reviewers: Anastasia, yaxunl, svenvh

Reviewed By: Anastasia

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D58388

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354568 91177308-0d34-0410-b5e6-96231b3b80d8

Gbp-Pq: Name OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch
clang/lib/CodeGen/CGBlocks.cpp
clang/lib/CodeGen/CGOpenCLRuntime.cpp
clang/lib/CodeGen/CGOpenCLRuntime.h
clang/test/CodeGenOpenCL/blocks.cl
clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl